home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
comm
/
bbs
/
Hydra11s.lha
/
HBBS
/
Source
/
Oberon
/
BBSStructures.mod
< prev
next >
Wrap
Text File
|
1996-07-06
|
28KB
|
675 lines
MODULE BBSStructures;
IMPORT e:= Exec, bc:= BBSConstants, s:= SYSTEM, Timer, Serial, Intuition;
TYPE
ScreenInfoDataPtr* = UNTRACED POINTER TO ScreenInfoData;
ScreenInfoData* = STRUCT
Scr: Intuition.ScreenPtr;
ScrModeID*: LONGINT;
ScrWidht*: LONGINT;
ScrHeight*: LONGINT;
ScrDepth*: LONGINT;
PubScreenName*: e.STRPTR;
UsePubScreen*: e.LONGBOOL;
END;
(* right, it is sooo cooool, basically a door calls the MenuPrompt function
like this:
DOORMenuPrompt(s.ADR("Fruit [O]ranges, [B]ananas, [A]pples"), "B");
where the B means that Banana's will be selected if the user just press return
then using the data in BBSColors we can change the output of the prompt
passed to MenuPrompt before we display it, here's an example of what
each setting might be set to... *)
BBSColsDataPtr* = UNTRACED POINTER TO BBSColsData;
BBSColsData* = STRUCT
MenuTextANSI*: e.STRPTR; (* default: white *)
MenuOpenBracket*: e.STRPTR; (* default: blue + "[" *)
MenuCloseBracket*: e.STRPTR; (* default: blue + "]" *)
MenuHighlightANSI*: e.STRPTR; (* default: yellow *)
MenuDefaultOptANSI*: e.STRPTR; (* default: bold + white *)
MenuPromptANSI*: e.STRPTR; (* default: blue + ":" *)
END;
BoolNodePtr* = UNTRACED POINTER TO BoolNode;
BoolNode* = STRUCT (node*: e.Node)
Boolean*: e.LONGBOOL;
END;
ConfAcsDataPtr* = UNTRACED POINTER TO ConfAcsDataPtr;
ConfAcsData* = STRUCT
Name*: e.STRPTR;
See*: e.ListPtr; (* list of BoolNode *)
Access*: e.ListPtr; (* list of BoolNode *)
END;
(* when a user joins a conf first copy the correct access settings from
the list of access settings in BBSGlobal^.AcsList (HBBS:Access/Level_XX
to Node^.User.Acs then overwrite this data using UpdateAcs(dest, new)
with the settings for the Node^.Acs (NodeX/Access/Level_XX)
then override these settings with the access settings from
the conference itself (Conf/Access/Level_XX) and finally
override these settings with the users own access settings *)
ConfDataPtr* = UNTRACED POINTER TO ConfData;
ConfData* = STRUCT (node*: e.Node) (* conference data is a linked list *)
(* the conference's name is stored in node^.name and loaded from
ConfName in the ConfConfig config file
makes it cool for intuition based utils (nukers ?) *)
ConfNum-: LONGINT; (* filled in by control *)
ConfActive-: e.LONGBOOL; (* if set you may use the conference
possible use is for cd-rom based conferences
you could write a door to de-activate
a conference if the cd was taken out
(but make sure there is NO users in the conf
when you modify this value *)
ConfAccess-: LONGINT; (* access required to enter conference *)
ConfPath-: e.STRPTR; (* public: path of the conference *)
HoldFileList-: e.STRPTR; (* path and file name of files that hold the list
or privately uploaded files *)
HoldFiles-: e.ListPtr; (* path(s) to above files *)
BadFileList-: e.STRPTR; (* same for bad/corrupt files *)
BadFiles-: e.ListPtr;
PartUpload-: e.ListPtr; (* path for uploaded files that were not completed *)
FileList-: e.ListPtr; (* file listings *)
FileLists-: LONGINT; (* contains amount of file lists *)
Upload-: e.ListPtr; (* path for uploaded files to go to *)
Download-: e.ListPtr; (* path to download files from *)
MaxDIZLines-: LONGINT; (* max lines for the file description *)
MenuPrompt*: e.STRPTR; (* prompt for the menu *)
AutoMailScan-: e.LONGBOOL; (* automatic mail scan ? *)
ConfPassWD-: e.STRPTR; (* conference password *)
UserAllowed-: e.ListPtr; (* list of users allowed, or NIL
if you want to allow every user to use the conf *)
KeepDIZWithFile-: e.LONGBOOL;(* if set it'll copy the FILE_ID.DIZ to
the directory as the file itself is stored
it's still kept in the archive too short! *)
END;
(* define all data needed for the device for the node *)
DeviceDataPtr* = UNTRACED POINTER TO DeviceData;
DeviceData* = STRUCT
SysopNode*: e.LONGBOOL; (* gets set to LTRUE if the device file
does not exist in the Nodes/NodeX/ directory
this determinate wether we open the serial port *)
(* following settings are defined in NodeX/device *)
DeviceName*: e.STRPTR; (* as in name of modem rather than amiga .device *)
SerialDevice*: e.STRPTR; (* path/name of .device file *)
SerialUnit*: LONGINT;
SerialBaud*: LONGINT; (* baud rate *)
ModemDebug*: e.LONGBOOL; (* show input/output to and from modem commands *)
ModemLog*: e.LONGBOOL; (* log all input/output of modem commands *)
EchoRetries*: LONGINT;
ReOpenRetries*: LONGINT;
ReOpenDelay*: LONGINT;
LockUpScript*: e.STRPTR;
MaxCommandWait*: LONGINT;
CommandRetries*: LONGINT;
DelayBetweenCmds*: LONGINT;
TildeDelay*: LONGINT;
TurnOnEcho*: e.ListPtr;
TurnOnEchoDelay*: LONGINT;
ModemInit*: e.ListPtr;
StrictConnect*: e.LONGBOOL;
StrictConnectStr*: e.ListPtr;
RelaxedConnectStr*: e.ListPtr;
CommandModeString*: e.ListPtr;
DropDTRHangup*: e.LONGBOOL;
HangUpString*: e.STRPTR;
OffHookString*: e.STRPTR;
Incoming*: e.STRPTR;
ImmediateAnswer*: e.STRPTR;
NullModemCable*: e.LONGBOOL; (* show input/output to and from modem commands *)
END;
NodeSettingsDataPtr* = UNTRACED POINTER TO NodeSettingsData;
NodeSettingsData* = STRUCT
(* these settings are always in memory, even when a node is closed
(for stuff like lastcallers utils to examine *)
SysopAccount*: e.STRPTR;
NodeName*: e.STRPTR;
NodePhone*: e.STRPTR;
NodeConnectScript*: e.STRPTR;
AskUserPW*: e.LONGBOOL;
UseSysPW*: e.LONGBOOL;
SysPW*: e.STRPTR;
SysPWScript*: e.STRPTR;
SysPWPrompt*: e.STRPTR;
UseNodePW*: e.LONGBOOL;
NodePW*: e.STRPTR;
NodePWScript*: e.STRPTR;
NodePWPrompt*: e.STRPTR;
UserNamePrompt*: e.STRPTR;
UserPWPrompt*: e.STRPTR;
NodeLogFile*: e.STRPTR;
ModemLogFile*: e.STRPTR;
CallersLogFile*: e.STRPTR;
DoorLogFile*: e.STRPTR;
DoorLog: e.LONGBOOL;
UploadLog*: e.LONGBOOL;
DownloadLog*: e.LONGBOOL;
ChatFlag*: e.LONGBOOL;
Iconified*: e.LONGBOOL;
UseOwnScreen*: e.LONGBOOL;
StartScreen*: e.LONGBOOL;
ScrModeID*: LONGINT;
ScrWidth*: LONGINT;
ScrHeight*: LONGINT;
ScrDepth*: LONGINT;
AccessRequired*: LONGINT;
UseDevice*: e.LONGBOOL;
AllowNewUsers*: e.LONGBOOL; (* set to LTRUE if you want new users to join *)
NodePlayPen*: e.STRPTR;
MaxDIZLines*: LONGINT; (* default max diz lines, it gets copied to NnD^.MaxDizLines *)
(* Much more to come... *)
END;
(* structure for time access data, see BBSGlobal^.TimeList for linked list of these *)
TimeAccessDataPtr* = UNTRACED POINTER TO TimeAccessData;
TimeAccessData* = STRUCT (node*: e.Node)
(* node^.name contains the filename from which the data was loaded
so that the filename in the users user.data is matched to node^.name
to find the right one, rather than searching/loading it every time
a user logs on *)
Times*: ARRAY 7, 24 OF e.LONGBOOL;
END;
(*
times between 1:00am and 12:59pm
AM PM
1 111 11
212345678901212345678901 a + here means a user can login during that
Mon +++++++++---------++++++ hour above the +, a - means the user is
d Tue +++++++++---------++++++ NOT allowed to login..
a Wed +++++++++---------++++++
y Thu +++++++++---------++++++ so in this example the user would be able
Fri +++++++++---------++++++ to login between 12:00am and 8:59am and
Sat ++++++++++++++++++++++++ between 6:00pm and 11:59pm except on the
Sun ++++++++++++++++++++++++ weekend where they can login at anytime..
NIGHT DAY NIGHT
cool huh ?
*)
AccessDataPtr* = UNTRACED POINTER TO AccessData;
AccessData* = STRUCT
AccessLevel*: LONGINT;
Data*: ARRAY bc.MaxAccessSettings OF CHAR;
END;
(* this is the format of the user.data file :-) no more hunting and
hacking to find it out! yeah !!
when memory is allocated for the userdata it should be cleared
so that when it si written to the end or back to the user.data file
it does not contain any garbage characters that would appear otherwise *)
UserDataPtr* = UNTRACED POINTER TO UserData;
UserData* = STRUCT
(* note: user's don't have any form of ID based upon position in the file
but they do have ID, which is their unique number that will always
be the same, even if the userdata file is tieded *)
UserID*: LONGINT; (* when a user joins the system they are given a number
this number is BBSGlobal^.LastUserNum + 1
this number is garunteed to be unique as this
number goes up one everytime a new user is added
to the user data file, but never goes down *)
Status*: CHAR; (* see HBBSContants.User#? *)
(* "N" for new user the user is a new user
"V" for validated the sysop has validated the user
"D" for deleted the sysop deleted the account
"I" for inactive the account became inactive
"L" for logins denied user is not allowed to login
"O" for overwritable set if you want this account
be erased by a new account *)
Access*: LONGINT; (* defines the users access level *)
Handle*: ARRAY bc.LenHandle + 1 OF CHAR; (* obvious *)
RealName*: ARRAY bc.LenRealName OF CHAR;
Group*: ARRAY bc.LenGroup + 1 OF CHAR;
GeoLocation*: ARRAY bc.LenGeoLocation OF CHAR;
Country*: ARRAY bc.LenCountry + 1 OF CHAR;
PhoneNumber*: ARRAY bc.LenPhoneNumber OF CHAR;
Password*: ARRAY bc.LenPassword + 1 OF CHAR;
(* not encrypted, as if i did encrypt it some bugger would write a password hacker *)
ComputerType*: ARRAY bc.LenComputerType OF CHAR;
(* sentby string, new for release A9 *)
SentBy*: ARRAY bc.LenSentBy + 1 OF CHAR;
(* note: this is a string, not a number! *)
ConfAcsDataFile*: ARRAY bc.LenConfAccessFile OF CHAR;
(* filename pointer to data for the access to conferences
we look in HBBS:System/Data/ConfAcs for the above filename
note: this might be blank, if so the confjoiner program must
check the access level of the conference the user wants to join
this file is normally only used to disable/enable access to conferences
without changing their access levels (which would enable more Acs#? commmands *)
LeechAcsDataFile*: ARRAY bc.LenLeechAccessFile + 1 OF CHAR;
(* we look HBBS:System/Data/LeechAcs for the above filename *)
(*below are the value the nuker should play with and all the doors
should actually use to figure out stuff like weektops/conf tops/charts *)
UploadBytes*: LONGINT;
UploadFiles*: LONGINT;
DownloadBytes*: LONGINT;
DownloadFiles*: LONGINT;
(* these numbers below are the ACTUAL amount of bytes the user has transfered
via file transfer protocol, no door should EVER change the values
in these variables, treats them as they were readonly
they should be used for programs that work out the amount of bytes that
have been uploaded to the system in a year, how many bytes have been nuked... *)
ActualUploadBytes-: LONGINT;
ActualUploadFiles-: LONGINT;
ActualDownloadBytes-: LONGINT;
ActualDownloadFiles-: LONGINT;
(* dates for last upload and when the user last called great for spotting
users who have uploaded loads and then turned into a leech
also so that doors can work out how many days since user last uploaded
great for creating list of lamers...
you could write a door that tell the user their account will expire in
n days if they do not upload ! cool ! *)
LastUploadDate*: LONGINT;
LastCalledDate*: LONGINT;
(* some vars for bulletin/top chart maker! :-) hope this helps! *)
BestCPSUp*: LONGINT;
BestCPSDown*: LONGINT;
CallsMade*: LONGINT;
PagesMade*: LONGINT;
MessagesWritten*: LONGINT;
BytesRatio*: LONGINT; (* as in N:1 *)
FilesRatio*: LONGINT;
LastConf*: LONGINT; (* last conf user was in when they logged off *)
PreferedConf*: LONGINT; (* users prefered conference, if this is not
set to 0 then join this conference instead of the
conference the user was last in
conference joiner must check that this is a valid
conf number and that the user has access to it
before joining it upon login *)
LinesPerScreen*: LONGINT; (* obvious *)
Protocol*: LONGINT; (* number of protocol to use, if set to 0 then the BBS
will ask the user what protocol the user whishes to use
for EVERY transfer *)
Editor*: LONGINT; (* same as above except for editing text files *)
ScreenType*: LONGINT; (* use for enabling/disabling ansi color *)
(* number of TimeAccess to use, define when a user can or can't login
looks in HBBS:System/Data/TimeAcs for this file
note: match this to the name in the BBSGlobal^.TimeAcsList
node's name field rather than loading each time as all access
data is loaded at control startup time *)
TimeAccessFile*: ARRAY bc.LenTimeAccess + 1 OF CHAR;
(* if set, will be added to the time allowed on-line, which is defined for each level *)
ExtraTimeLimit*: LONGINT;
ExtraBytesLimit*: LONGINT; (* same for download bytes *)
ExtraCallsLimit*: LONGINT; (* same for call in one day *)
ExtraChatLimit*: LONGINT; (* same for chat time *)
BytesAllowed*: LONGINT; (* amount of bytes user is allowed to download *)
TimeAllowed*: LONGINT; (* amount of time allowed in one day *)
ChatAllowed*: LONGINT; (* amount of chat time allowed in one day *)
CallsAllowed*: LONGINT; (* amount of calls in one day *)
TimeUsed*: LONGINT; (* time used today *)
BytesUsed*: LONGINT; (* amount of bytes downloaded today *)
CallsUsed*: LONGINT; (* amount of calls made today *)
ChatUsed*: LONGINT; (* chat made today *)
UserType*: CHAR; (* set to UserTypeNormal or UserTypeExpert *)
Language*: LONGINT; (* Number of languageName/Extn to be used *)
END;
NodeUserPtr* = UNTRACED POINTER TO NodeUser;
NodeUser* = STRUCT
valid*: BOOLEAN; (* if there is no user on-line this will be set to LFALSE *)
NormalData*: UserData; (* the user data is loaded here first *)
(* then copied to here, and THIS is the data most of your doors/programms
should use to determine access and stuff as the sysop might want to
override the access level settings for the call *)
CallData*: UserData;
TimeAcs*: TimeAccessDataPtr; (* only point to TimeAccessData already loaded *)
Acs*: AccessData;
(* current access settings (dependant on conference, node, and normal in that order) *)
ConfAcs*: ConfAcsData; (* set up when user logs in *)
FilesUploaded*: LONGINT; (* during this logon *)
FilesDownloaded*: LONGINT;
BytesUploaded*: LONGINT;
BytesDownloaded*: LONGINT;
PagesMade*: LONGINT;
NukedFiles*: LONGINT; (* the amount of files other that the user has nuked *)
MsgsRead*: LONGINT;
MsgsWritten*: LONGINT;
END;
(* all messages sent to a CONTROL/NODE/DOOR program must contain these variables
so we know what's happening (and to aid message trace program)... *)
(* note: always the case in Oberon :-) *)
NodeMsgPtr* = UNTRACED POINTER TO NodeMsg;
NodeMsg* = STRUCT (message*: e.Message)
MsgType*: LONGINT;
NodeNum*: LONGINT;
END;
(* sent between from a node to the control program *)
StatusMsg* = STRUCT (message*: NodeMsg)
Status*: LONGINT;
END;
(* message sent FROM a node to the control program *)
RequestMsg* = STRUCT (message*: NodeMsg)
Flags*: LONGINT;
END;
(* used for communication between a door and a node *)
DoorIOMessage* = STRUCT (message*: NodeMsg)
Status*: LONGINT;
Data*: e.STRPTR; (* null terminated string *)
DataLength*: LONGINT; (* string length *)
Flags*: LONGINT;
ReturnVal*: LONGINT;
OptionStr*: e.STRPTR;
Num1*: LONGINT;
Num2*: LONGINT;
END;
(* tells the node when a door has started and when one has stopped *)
DoorActivityMsg* = STRUCT (message*: NodeMsg)
Status*: LONGINT;
END;
DoorDataPtr* = UNTRACED POINTER TO DoorData;
DoorData* = STRUCT (node*: e.Node)
DoorPort*: e.MsgPortPtr;
ReplyPort*: e.MsgPortPtr;
DoorPortName*: ARRAY 20 OF CHAR;
SystemOptions*: e.STRPTR;
END;
TimerDataPtr* = UNTRACED POINTER TO TimerData;
TimerData* = STRUCT (node*: e.Node)
TR*: Timer.TimeRequest;
END;
TimerSetupDataPtr* = UNTRACED POINTER TO TimerSetupData;
TimerSetupData* = STRUCT
TimerPort*: e.MsgPortPtr;
BlankTimerIO*: Timer.TimeRequestPtr;
TimerList*: e.ListPtr;
TimerOpen*: e.LONGBOOL;
END;
NodeDataPtr* = UNTRACED POINTER TO NodeData;
NodeData* = STRUCT (node: e.Node) (* for passing to list and for the ctrlwnd list view *)
Status*: LONGINT; (* public *)
NodeNum*: LONGINT;
AutoStart: e.LONGBOOL; (* private *)
(* port name for node, used to ask the node program stuff by doors *)
PortName*: ARRAY 14 OF CHAR;
DoorStartPortName: ARRAY 26 OF CHAR; (* private *)
NodePort,
ReplyPort,
ConRPort,
ConWPort,
SerPort: e.MsgPortPtr; (* all private *)
ConRead,
ConWrite: e.IOStdReqPtr;
SerRead,
SerWrite: Serial.IOExtSerPtr; (* private stuff *)
NodeTimer : TimerSetupDataPtr;
ConScr: Intuition.ScreenPtr;
ConWin,
NodeWnd,
InfoWnd,
SettingsWnd: Intuition.WindowPtr;
ConX, ConY, ConW, ConH, NodeX, NodeY: LONGINT;
SettingsOpen*: e.LONGBOOL; (* public *)
InformationOpen*: e.LONGBOOL;
WindowTitle: ARRAY 90 OF CHAR; (* private *)
(* public: will be set to true if console window for node is open *)
ConOk*: e.LONGBOOL;
SerOk: e.LONGBOOL;
SerOPEN: e.LONGBOOL;
ConBuffer: e.STRPTR;
ConBufferLen: LONGINT;
ConBytes: LONGINT;
SerBuffer: e.STRPTR;
SerBufferLen: LONGINT;
SerBytes: LONGINT;
IBuffer: e.STRPTR;
IBytes: LONGINT;
SerWaiting: e.LONGBOOL;
ConWaiting: e.LONGBOOL;
char1: CHAR;
csistring: ARRAY 256 OF CHAR;
TimerSig,
SerSig,
InfoWinSig,
SettingsWinSig,
ConSig,
ConWinSig,
PortSig,
WinSig: LONGINT;
(* public: after you call DOORGetLine this contain the string that was typed *)
CurrentLine*: e.STRPTR;
(* public: after you call DOORGetLine with a GlLineWrap flag this may
contain some data if the user was in the middle or writing a word
see the LineEditor for an example of it's usage *)
CurrentLineWrap*: e.STRPTR;
LoginType*: LONGINT; (* default to LoginNone *)
NodeFlags*: LONGSET;
RequestShutdown: e.LONGBOOL;
(* public: actual path of the NODEx directory, path setting, should be
initialised by Control, MUST an WILL always have a trailing : or / *)
NodeLocation*: e.STRPTR;
(* public: options from the device file *)
NodeDevice*: DeviceData;
(* public: the following options are defined in the nodeglobal or nodelocal files *)
NodeSettings*: NodeSettingsData;
(* public: info about the user who's online,
check NnD^.User.Valid before accessing any more data ! in the structure *)
User*: NodeUser;
DoorsRunning: LONGINT;
(* public: pointer to doordata structure of the active door, most of the
time will point to some door of somekind *)
ActiveDoor*: DoorDataPtr;
DoorReturn: ARRAY bc.LenMaxDoorReturn OF CHAR;
(* public: as the door has the ability to spawn another door we need to keep
track of the loaded doors, and the order in which we ran them *)
DoorList*: e.ListPtr;
(* public: pointer to conference that user is in, warning: might be NIL *)
CurrentConf*: ConfDataPtr;
(* Acs: AccessData; *)
ConnectBaud*: ARRAY bc.MaxCPSBaudLen + 1 OF CHAR; (* public *)
Action*: ARRAY bc.MaxActionLen OF CHAR; (* public, used by Who door *)
TransferringFile*: e.LONGBOOL;
(* public readable and door setable: if a user is on-line, it will be
set to OsOnline, otherwise it will be set to OsOffline, this variable
is used by the node program to determine wether or not continue running
the next door in the sequence or to reset the node *)
OnlineStatus*: e.LONGBOOL;
LastCallers*,
LastUploads*,
LastDownloads*,
LastPagers*,
LastPWFails*,
LastCarrier*: e.ListPtr;
MaxLastCallers*,
MaxLastUploads*,
MaxLastDownloads*,
MaxLastPagers*,
MaxLastPWFails*,
MaxLastCarrier*: LONGINT;
CurrentLastCallers*,
CurrentLastUploads*,
CurrentLastDownloads*,
CurrentLastPagers*,
CurrentLastPWFails*,
CurrentLastCarrier*: LONGINT;
(* list of tagged files that's saved and reloaded by the node program, when
a user logs off and logs on respectively *)
TaggedFileList*: e.ListPtr;
TaggedFiles*: LONGINT; (* number of tagged files *)
(* when a user is not in a conference then this is gained from
NnD^.NodeSettings.MaxDIZLines, otherwise it copied from
NnD^.CurrentConf^.MaxDIZLines *)
MaxDIZLines*: LONGINT;
DoorContinue*: e.LONGBOOL;
AllowLogins*: e.LONGBOOL;
(* fill this with the characters you want the user to be able to use
when using DOORGetLine and specify GlUseChars as one of the flags
and when a user presses a key that's not in this string a BEEP will
be sent to their system and the key will not be added to te current line *)
CharsAllowed*: e.STRPTR;
CallsToday*: LONGINT;
OLMList*: e.ListPtr;
OLMCount*: LONGINT; (* see also NflgOLMWaiting and OLMNode *)
(* send a message to this port to make the bbs check for OLMs *)
OLMPort*: e.MsgPortPtr;
(* array of actions, check out the Act#? definitions, basically it is set
to a string full of spaces upon node initialisation and then actions are
set if users run particular types of door, this is SOOOO handy for writing
lastcallers door, this information is also written to the callers log when
a user logs off *)
Actions*: ARRAY bc.LenActions + 1 OF CHAR;
(* for setting colours of stuff like menu's etc... *)
BBSCols*: BBSColsDataPtr;
LastCalledDate*: ARRAY bc.LenDateStr OF CHAR;
LastCalledTime*: ARRAY bc.LenTimeStr OF CHAR;
DoorLogOverride: e.LONGBOOL;
END;
TaggedFilePtr* = UNTRACED POINTER TO TaggedFile;
TaggedFile* = STRUCT (node*: e.Node) (* node^.name is the name that's tagged *)
ConferenceNum*: LONGINT; (* the number of the conference that the file is in *)
(* size of the file (must be filled in or set to 0, this is used to determine
if the user has enough creds to d/l and will be added to their bytes
uploaded/downloaded total *)
FileSize*: LONGINT;
(* if LTRUE then bytes will be added to the ActualDownload#? and Download#?,
if false then bytes will only be added to ActualDownload#?
(i.e user does not loose creds if a non warez file) *)
WarezFile*: e.LONGBOOL;
END;
(* config files are read into memory and line by line are loaded into a linked
list of items and parameters, then to get a config option all we have to do
is search the linked list of items for a matching item name and return the
params in a desired format, this works out much quicker than loading the config
into memory and parsing it everytime you want an option (which is how i did it
to start with) it's only when you try running on a (lame) A500 that you realize
how slow it is to read in about 50-60 options when you start a node using the
older method ! *)
CfgItemDataPtr* = UNTRACED POINTER TO CfgItemData;
CfgItemData* = STRUCT (node*: e.Node) (* node^.name contain item name *)
Params*: e.STRPTR; (* params contain the string of the parameter... *)
END;
CfgFileDataPtr* = UNTRACED POINTER TO CfgFileData;
CfgFileData* = STRUCT
ItemList*: e.ListPtr; (* list of CfgItemDataPtr nodes *)
filename*: e.STRPTR;
END;
(* because of the way HBBS data is stored in memory via linked variables ANY
program can access ALL DATA of the bbs and all of it's nodes at any time
just by getting a pointer to the following structure... *)
ProtocolNodePtr* = UNTRACED POINTER TO ProtocolNode;
ProtocolNode* = STRUCT (node*: e.Node) (* node^.name if Protocol name *)
protocoltype*: LONGINT; (* pTypeBidirectional or pTypeUnidirectional *)
modulename*: e.STRPTR; (* name of door module to run *)
moduleopts*: e.STRPTR; (* door options supplied to protocol module door *)
allowUl*: e.LONGBOOL; (* you can specify a protocol is only availiable for *)
allowDl*: e.LONGBOOL; (* upload or download or both! *)
allowBatch*: e.LONGBOOL;(* allow transfer of more than one file *)
END;
BBSGlobalDataPtr* = UNTRACED POINTER TO BBSGlobalData;
BBSGlobalData* = STRUCT
NodeGlobalData: NodeDataPtr;
NodeList: e.ListPtr;
CtrlMainPort, CtrlMainReplyPort: e.MsgPortPtr;
TimesList: e.ListPtr;
ScreenInfo: ScreenInfoData;
(* settings for bbs, all structures are sub structures of this... *)
(* public: linked list of all conference data (ConfDataPtr) *)
ConfList*: e.ListPtr;
(* public: amount of conferences (active or not) (initialised by Control) *)
Conferences*: LONGINT;
(* public: linked list of TimeAcs's (TimeAccessDataPtr) *)
TimeAcsList*: e.ListPtr;
(* public: amount of TimeAcs's loaded *)
TimeAccesses*: LONGINT;
(* public: list of access levels *)
(* node^.name contain a string of the access level number *)
AcsLevelList*: e.ListPtr;
(* node^.name contain a string of the access level name *)
AcsLevelNames*: e.ListPtr;
(* node^.name contain a string of the name of the default
conference access level settings file *)
AcsLeveConfAcsDef: e.ListPtr;
AcsLevels*: LONGINT; (* public: amount of access levels *)
TotalUsers-: LONGINT; (* read only: amount of users in the user database *)
ErrorLogFile*: e.STRPTR;
BBSNodes*: LONGINT;
BBSName*: e.STRPTR;
BBSSerial*: e.STRPTR;
BBSLocation*: e.STRPTR;
BBSCountry*: e.STRPTR;
BBSGroup*: e.ListPtr;
SysopAccount*: e.STRPTR;
Drive*: e.ListPtr;
BBSDrive*: e.STRPTR;
MinFreeSpace*: LONGINT;
NoFreeSpaceScript*: e.STRPTR;
ButtonName*: e.ListPtr;
ButtonCMD*: e.ListPtr;
HideScreen*: e.LONGBOOL;
UserDataFileName*: e.STRPTR;
NewUserAccessLevel*: LONGINT;
MaxUsernameAttempts*: LONGINT;
MaxPasswordAttempts*: LONGINT;
MinPasswordLength*: LONGINT;
NewUserConf*: LONGINT; (* found in HBBS:Conferences/ConfList *)
LastUserNum-: LONGINT; (* readonly: userid of the last user added to the system *)
LanguageName*: e.ListPtr;
LanguageExtn*: e.ListPtr;
Languages*: LONGINT;
ProtocolList*: e.ListPtr; (* list of protocol information *)
Protocols*: LONGINT; (* amount of protocols loaded *)
EditorCMD*: e.STRPTR; (* program to be used for editing text files ! *)
LastCalledDate*: ARRAY bc.LenDateStr OF CHAR;
LastCalledTime*: ARRAY bc.LenTimeStr OF CHAR;
CallsToday*: LONGINT; (* saved in file HBBS:System/Data/Calls.CFG *)
CopyBufferSize*: LONGINT;
CallsEver-: LONGINT; (* total amount of calls bbs has received *)
END;
(* an OLM door should check for the AccessLevel AcsAllowOLM before a user is
allowed to send an OLM... this is not part of HBBSAddOLM as you might want
other doors to send OLM's (e.g LogonAnnounce doors...)
OLM stand for OnLine Message *)
OLMNodePtr* = UNTRACED POINTER TO OLMNode;
(* node^.name contain the message, null terminated string
it *CAN* have \n's in it...*)
OLMNode* = STRUCT (node*: e.Node)
(* handle of the user who sent the olm handle does not have to be valid
but if you want to reply to an OLM then you MUST check to see if it's valid..
reason: announce doors don't have handles *)
Handle*: ARRAY bc.LenHandle + 1 OF CHAR;
Time*: ARRAY bc.LenTimeStr OF CHAR; (* time olm was sent is added here... *)
Date*: ARRAY bc.LenDateStr OF CHAR; (* date olm was sent is added here... *)
FromPRG*: ARRAY bc.LenHandle OF CHAR; (* name of the program that sent the door *)
FromNode*: LONGINT; (* 0 for external program, or a NnD^.NodeNum+1 *)
END;
END BBSStructures.